import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/md/unit/list',
    method: 'get',
    params
  })
}
export function addMeasure(data) {
  return request({
    url: '/md/unit/sava',
    method: 'post',
    data
  })
}
export function mdUnitInfo(params) {
  return request({
    url: '/md/unit/info',
    method: 'get',
    params
  })
}
export function updateMeasure(data) {
  return request({
    url: '/md/unit/update',
    method: 'post',
    data
  })
}

export function findPrimaryUnit() {
  return request({
    url: '/md/unit/primaryUnit',
    method: 'get',
   
  })
}
export function delById(id) {
  return request({
    url: '/md/unit/deletebyId?id=' + id,
    method: 'post'
    
  })
}
export function delBatch(ids) {
  return request({
    url: '/md/unit/deleteBatch',
    method: 'post',
    data: ids
  })
}
